import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import elementPlus from 'element-plus'
import 'element-plus/theme-chalk/index.css';
import './assets/gloable.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import * as Icons from '@element-plus/icons-vue';  
import locale from 'element-plus/dist/locale/zh-cn.mjs' //如果是vite构建，引入部分会爆红，可以在vite-env.d.ts中declare一下 
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import request from '@/utils/request'
import store from '@/store'

const app = createApp(App).use(router)

//app.config.productionTip = false;
app.config.globalProperties.$icon = Icons
app.config.globalProperties.request = request //设置封装全局调用axios方法this.$request()
//app.config.globalProperties.store = store  


// 注册所有图标  
Object.keys(Icons).forEach(key => {  
    app.component(key, Icons[key]);  
  });  

//app.use(elementPlus);
//app.use(elementPlus, { size: 'small' });
app.use(elementPlus, { size: 'mini',locale: zhCn });
app.use(Icons, { size: 'mini',locale: zhCn });
app.use(store);
app.mount('#app')
